#ifndef DW_BASE_CONFIG_H
#	define DW_BASE_CONFIG_H

//! \brief Version definitions
#define DW_VERSION 000100
#define DW_VERSION_STR "00.01.00"

#define DW_ENABLED 1
#define DW_DISABLED 0

//! \brief Endianess definitions
#define DW_ENDIANESS_UNKNOWN 0 //!< Unknown endianess
#define DW_ENDIANESS_LITTLE  1 //!< Little endian
#define DW_ENDIANESS_BIG     2 //!< Big endian

//! \brief Compilation configurations definitions
#define DW_CONFIG_UNKNOWN 0 //!< Unknown configuration
#define DW_CONFIG_DEBUG   1 //!< Configuration Debug
#define DW_CONFIG_RELEASE 2 //!< Configuration Release
#define DW_CONFIG_MASTER  3 //!< Configuration Master

//! \brief Platforms definitions
#define DW_PLATFORM_UNKNOWN 0 //!< Unknown platform
#define DW_PLATFORM_WIN32   1 //!< Windows running on x86
#define DW_PLATFORM_WIN64   2 //!< Windows 64 bit running on X64/A64/I64
#define DW_PLATFORM_MAC     3 //!< Mac OS
#define DW_PLATFORM_LINUX   4 //!< Linux
#define DW_PLATFORM_XENON   5 //!< Microsoft Xbox 360
#define DW_PLATFORM_PS3_PPU 6 //!< Sony PlayStation 3 PPU
#define DW_PLATFORM_PS3_SPU 7 //!< Sony PlayStation 3 SPU

//! \brief Microsoft platforms
#define DW_PLATFORM_WINDOWS ((DW_PLATFORM == DW_PLATFORM_WIN32) || (DW_PLATFORM == DW_PLATFORM_WIN64))
#define DW_PLATFORM_MS (DW_PLATFORM_WINDOWS || (DW_PLATFORM == DW_PLATFORM_XENON))

//! \brief Sony platforms (PS3)
#define DW_PLATFORM_PS3  ((DW_PLATFORM == DW_PLATFORM_PS3_PPU) || (DW_PLATFORM == DW_PLATFORM_PS3_SPU))
#define DW_PLATFORM_SONY (DW_PLATFORM_PS3)

//! \brief Compilers definitions
#define DW_COMPILER_UNKNOWN 0 //!< Unknown compiler
#define DW_COMPILER_VC07    1 //!< Microsoft VC++ 2003
#define DW_COMPILER_VC08    2 //!< Microsoft VC++ 2005
#define DW_COMPILER_VC09    3 //!< Microsoft VC++ 2008
#define DW_COMPILER_VC10    4 //!< Microsoft VC++ 2010
#define DW_COMPILER_GCC     5 //!< GCC: GNU Compiler Collection
#define DW_COMPILER_SN      6 //!< SN System Compiler
#define DW_COMPILER_INTEL   7 //!< Intel C++ Compiler

//! \brief Microsoft compilers
#define DW_COMPILER_MSDEV ((DW_COMPILER == DW_COMPILER_VC07) || (DW_COMPILER == DW_COMPILER_VC08) || (DW_COMPILER == DW_COMPILER_VC09) || (DW_COMPILER == DW_COMPILER_VC10))

#include "base/configautodetect.h"

#if !defined(DW_CONFIG) || (DW_CONFIG == DW_CONFIG_UNKNOWN)
#	define DW_CONFIG   DW_CONFIG_AUTODETECT
#endif // !DW_CONFIG

#if !defined(DW_PLATFORM) || (DW_PLATFORM == DW_PLATFORM_UNKNOWN)
#	define DW_PLATFORM DW_PLATFORM_AUTODETECT
#endif // !DW_PLATFORM

#if !defined(DW_COMPILER) || (DW_COMPILER == DW_COMPILER_UNKNOWN)
#	define DW_COMPILER DW_COMPILER_AUTODETECT
#endif // !DW_COMPILER

#ifndef DW_MODULE
#	define DW_MODULE "unknown"
#endif // !DW_MODULE

#ifndef DW_MODULE_VERSION
#	define DW_MODULE_VERSION DW_VERSION
#endif // !DW_MODULE_VERSION

#ifndef DW_MODULE_VERSION_STR
#	define DW_MODULE_VERSION_STR DW_VERSION_STR
#endif // !DW_MODULE_VERSION_STR

#pragma message("Compiling module: "DW_MODULE" v"DW_MODULE_VERSION_STR)

#if (DW_PLATFORM == DW_PLATFORM_WIN32)
#	pragma message("Platform: Win32")
#elif (DW_PLATFORM == DW_PLATFORM_WIN64)
#	pragma message("Platform: Win64")
#elif (DW_PLATFORM == DW_PLATFORM_MAC)
#	pragma message("Platform: Mac")
#elif (DW_PLATFORM == DW_PLATFORM_LINUX)
#	pragma message("Platform: Linux")
#elif (DW_PLATFORM == DW_PLATFORM_XENON)
#	pragma message("Platform: Xenon")
#elif (DW_PLATFORM == DW_PLATFORM_PS3_PPU)
#	pragma message("Platform: PS3")
#elif (DW_PLATFORM == DW_PLATFORM_PS3_SPU)
#	pragma message("Platform: PS3 SPU")
#else
#	error "No platform"
#endif

#if (DW_COMPILER == DW_COMPILER_VC07)
#	pragma message("Compiler: Microsoft Visual C++ .NET 2002")
#elif (DW_COMPILER == DW_COMPILER_VC08)
#	pragma message("Compiler: Microsoft Visual C++ 2005")
#elif (DW_COMPILER == DW_COMPILER_VC09)
#	pragma message("Compiler: Microsoft Visual C++ 2008")
#elif (DW_COMPILER == DW_COMPILER_VC10)
#	pragma message("Compiler: Microsoft Visual C++ 2010")
#elif (DW_COMPILER == DW_COMPILER_GCC)
#	pragma message("Compiler: GCC")
#elif (DW_COMPILER == DW_COMPILER_SN)
#	pragma message("Compiler: SN System")
#elif (DW_COMPILER == DW_COMPILER_INTEL)
#	pragma message("Compiler: Intel")
#else
#	error "No compiler"
#endif

#if (DW_CONFIG == DW_CONFIG_DEBUG)
#	pragma message("Configuration: Debug")
#elif (DW_CONFIG == DW_CONFIG_RELEASE)
#	pragma message("Configuration: Release")
#elif (DW_CONFIG == DW_CONFIG_MASTER)
#	pragma message("Configuration: Master")
#else
#	error "No configuration"
#endif

#if DW_COMPILER_MSDEV
#	define NOMINMAX
#endif // DW_COMPILER_MSDEV

#endif // !DW_BASE_CONFIG_H
